#include "progress.h"

char style[S_NUM] = {'#','>','*','+','='};
void ProgressOn()
{
  char buffer[NUM];
  int cnt = 0;
  memset(buffer, '\0', sizeof(buffer));
  const char* lable = "|\\-/";
  while (cnt <= 100)
  {
    printf("[%-100s][%-3d%%][%c]\r", buffer,cnt,lable[cnt % 4]);
    fflush(stdout);
    buffer[cnt++] = style[N];
    usleep(50000);
  }
  printf("\n");
}
